<template>
  <span @click="toToDo">
    <!-- <el-badge :value="todoData.qty||0" :max="99"> -->
    <i class="iconfont iconicon_airplay"></i>
    <!-- </el-badge> -->
  </span>
</template>

<script>
import { mapGetters } from "vuex";
export default {
  name: "top-todo",
  computed: {
    ...mapGetters(["todoData", "userInfo"]),
  },
  created() {
    // 初始化用户数据
    this.$store
      .dispatch("GetNewUserInfo", { userId: this.userInfo.userId })
      .then(() => {
        // 初始化待办数据
        this.$store.dispatch("SetTodoData");
      });
  },
  methods: {
    toToDo() {
      this.$router.push({ path: "/desk/todo" });
    },
  },
};
</script>

<style lang="scss" scoped>
</style>
